
import axios from 'axios';

/**
 * 维修评价
 */
export class RepairEvaluateService {
    // 分页查询列表
    static findRepairEvaluates (queryParams) {
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluates',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的维修评价
    static findRepairEvaluate (repairEvaluateId) {
        const query = {
            repairEvaluateId
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluate',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(包含外键名称)
    static findRepairEvaluateForView (repairEvaluateId) {
        const query = {
            repairEvaluateId
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluateForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(包含外键名称)
    static findRepairEvaluateForEdit (repairEvaluateId) {
        const query = {
            repairEvaluateId
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluateForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(只提取ID 和 Name)
    static findRepairEvaluatesWithIdNameById (repairEvaluateId) {
        const query = {
            repairEvaluateId
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluatesWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询维修评价集合(只提取ID 和 Name)
    static findRepairEvaluatesWithIdNameByName (repairEvaluateName) {
        const query = {
            repairEvaluateName
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/findRepairEvaluatesWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存维修评价
    static saveRepairEvaluate (repairEvaluate) {
        const query = {}
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/saveRepairEvaluate',
            method: 'POST',
            params: query,
            data: repairEvaluate
        });
    }

    //修改保存维修评价
    static updateRepairEvaluate (repairEvaluate) {
        const query = {}
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/updateRepairEvaluate',
            method: 'POST',
            params: query,
            data: repairEvaluate
        });
    }

    //根据ID查询指定的维修评价(只提取ID 和 Name)
    static deleteRepairEvaluate (repairEvaluateId) {
        const query = {
            repairEvaluateId
        }
        return axios({
            url: '/repair/repairManagement/RepairEvaluate/deleteRepairEvaluate',
            method: 'POST',
            params: query,
        });
    }
}
